package org.example.controller;

import org.example.api.UserService;
import org.example.model.SysUser;
import org.example.service.impl.SysUserServiceImpl;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class UserController implements UserService {

    private final SysUserServiceImpl sysUserServiceImpl;

    public UserController(SysUserServiceImpl sysUserServiceImpl) {
        this.sysUserServiceImpl = sysUserServiceImpl;
    }


    public SysUser getUserByUsername(String name) {
        return sysUserServiceImpl.getUserByUsername(name);
    }
}
